package com.slz3.business.module.socialManagement.socDianzan.steward;

import com.slz3.business.module.socialManagement.socDianzan.domain.SocDianzan;
import com.slz3.business.module.socialManagement.socDianzan.domain.SocDianzanCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class SocDianzanResponse {

    public static Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(SocDianzan.class).flatMap(socDianzan ->
                SocDianzanResController.add(req, socDianzan)
        );
    }

    public static Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(SocDianzanCondition.class).flatMap(socDianzanCondition ->
                SocDianzanResController.delete(req, socDianzanCondition)
        );
    }

    public static Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(SocDianzan.class).flatMap(socDianzan ->
                SocDianzanResController.modify(req, socDianzan)
        );
    }


    public static Mono<ServerResponse> list(ServerRequest req) {
        return SocDianzanResController.list(req);
    }

    public static Mono<ServerResponse> info(ServerRequest req) {
        return SocDianzanResController.info(req);
    }

    public static Mono<ServerResponse> choice(ServerRequest req) {
        return SocDianzanResController.choice(req);
    }

    public static Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(SocDianzanCondition.class).flatMap(socDianzanCondition ->
                SocDianzanResController.auditSubmit(req, socDianzanCondition)
        );
    }

    public static Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(SocDianzanCondition.class).flatMap(socDianzanCondition ->
                SocDianzanResController.audit(req, socDianzanCondition)
        );
    }

    public static Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(SocDianzanCondition.class).flatMap(socDianzanCondition ->
                SocDianzanResController.auditReject(req, socDianzanCondition)
        );
    }

    public static Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(SocDianzanCondition.class).flatMap(socDianzanCondition ->
                SocDianzanResController.usingEnable(req, socDianzanCondition)
        );
    }

    public static Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(SocDianzanCondition.class).flatMap(socDianzanCondition ->
                SocDianzanResController.usingDisable(req, socDianzanCondition)
        );
    }   

}
